<template>
  <div>
    <div>
      <h2>{{ user.name }}</h2>
      <h2>{{ user.age }}</h2>
      <h2>{{ user.addr }}</h2>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'ChildCpn',
    props: {
      user: {
        type: Object,
        require: true,
        default: () => {    // 设置对象默认值
          return {
            name: "zs",
            age: 1,
            addr: "bj"
          }
        }
      }
    }
  }
</script>

<style scoped>

</style>
